home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / C Internet Config / IC Application Source ƒ / Headers ƒ / IC Window Globals.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-04  |  2.7 KB  |  138 lines  |  [TEXT/SPM ]

  1. /*
  2.     IC Window Globals.h
  3.     
  4.     Header file for IC Window Globals.c
  5.     
  6. */
  7.  
  8. #pragma once
  9.  
  10. #ifndef __H_IC_Window_Globals__
  11. #define __H_IC_Window_Globals__
  12.  
  13. typedef enum {
  14.     WT_None=0,WT_About,WT_Main,WT_Personal,WT_Email,WT_News,
  15.     WT_FileTransfer,WT_OtherServices,WT_Font,WT_FileMapping,WT_Helper,
  16.     WT_SocksServices
  17. } WindowType;
  18.  
  19. extern short WT_Last;
  20.  
  21. enum {
  22.     itemEnable=0
  23. };
  24.  
  25. enum {
  26.     whatNULL=1,whatTEXT,whatSPOP,whatFFSP,whatFPOP,whatFMAP,whatFBUT,
  27.     whatHMAP,whatHBUT,whatBUTN,whatFSIZ,whatCBOX,whatLAST
  28. };
  29.  
  30. #define item_max 10
  31. #define whats_max whatLAST
  32.  
  33. #if defined(powerc) || defined (__powerc)
  34. #pragma options align=mac68k
  35. #endif
  36. struct WhatStruct {
  37.     Str31 key;
  38.     OSType typ;
  39.     long flags;
  40.     Ptr data;
  41.     Ptr spare_data;
  42.     FSSpec fss;
  43.     Boolean modified;
  44. };
  45. #if defined(powerc) || defined (__powerc)
  46. #pragma options align=reset
  47. #endif
  48.  
  49. typedef struct WhatStruct WhatRecord,* WhatRecordPtr;
  50.  
  51. #if defined(powerc) || defined (__powerc)
  52. #pragma options align=mac68k
  53. #endif
  54. struct WindowInfoStruct {
  55.     WindowPtr window;
  56.     WhatRecordPtr items[item_max+1];
  57.     Boolean window_key_needs_tabs;
  58.     short selected_item;
  59.     short id;
  60.     Point position;
  61. };
  62. #if defined(powerc) || defined (__powerc)
  63. #pragma options align=reset
  64. #endif
  65.  
  66. typedef struct WindowInfoStruct WindowInfoRec,* WindowInfoPtr;
  67.  
  68. #if defined(powerc)||defined(__powerc)
  69. #pragma options align=mac68k
  70. #endif
  71. struct WhatTemplateStruct {
  72.     Str31 key;
  73.     OSType typ;
  74.     long flags;
  75. };
  76. #if defined(powerc)||defined(__powerc)
  77. #pragma options align=reset
  78. #endif
  79.  
  80. typedef struct WhatTemplateStruct WhatTemplateRecord,WhatTemplateArray[item_max+1],
  81.     * WhatTemplateArrayPtr,** WhatTemplateArrayHandle;
  82.  
  83. typedef Point* PointArray;  // if WT_Last was a constant, we could use [WT_Last+1];
  84.  
  85. #include "IC Universals.h"
  86.  
  87. #if defined(powerc) || defined (__powerc)
  88. #pragma options align=mac68k
  89. #endif
  90. struct WhatInfoStruct {
  91.     OSType typ;
  92.     WindowPlainUPP open;
  93.     WindowEventUPP key;
  94.     WindowEventUPP click;
  95.     WindowBooleanUPP activate;
  96.     WindowPlainUPP idle;
  97.     WindowPlainUPP flush;
  98.     WindowPlainUPP close;    // must be able to call close after successful *or* failed open
  99.     WindowCursorUPP cursor;
  100.     short cursorid;
  101. };
  102. #if defined(powerc) || defined (__powerc)
  103. #pragma options align=reset
  104. #endif
  105.  
  106. typedef struct WhatInfoStruct WhatInfoRec,* WhatInfoPtr;
  107.  
  108. #define wf_locked 31
  109. #define wf_locked_mask 0x80000000
  110.  
  111. extern WindowInfoRec* WindowInfo;
  112. extern WhatInfoRec WhatInfo[];
  113.  
  114. #ifdef __cplusplus
  115. extern "C" {
  116. #endif
  117.  
  118. short GetSelectedItem(WindowType wt);
  119. WindowType GetWindowType(WindowPtr wp);
  120.  
  121. void ProcessAttributes(WindowType wt,short item,long attr);
  122. Boolean IsLocked(WindowType wt,short item);
  123. void LockedAlert(WindowType wt,short item);
  124.  
  125. void InitICWindowGlobals(void);
  126.  
  127. #ifdef __cplusplus
  128. }
  129. #endif
  130.  
  131. #endif /* __H_IC_Window_Globals__ */
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.